package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.NoticeMapper;
import com.ruoyi.system.domain.Notice;
import com.ruoyi.system.service.INoticeService;

import javax.annotation.Resource;

/**
 * 标书通知Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-30
 */
@Service
public class NoticeServiceImpl implements INoticeService {
    @Resource
    private NoticeMapper noticeMapper;

    /**
     * 查询标书通知
     *
     * @param id 标书通知主键
     * @return 标书通知
     */
    @Override
    public Notice selectNoticeById(Long id) {
        return noticeMapper.selectNoticeById(id);
    }

    /**
     * 查询标书通知列表
     *
     * @param notice 标书通知
     * @return 标书通知
     */
    @Override
    public List<Notice> selectNoticeList(Notice notice) {
        return noticeMapper.selectNoticeList(notice);
    }

    /**
     * 新增标书通知
     *
     * @param notice 标书通知
     * @return 结果
     */
    @Override
    public int insertNotice(Notice notice) {
        notice.setCreateTime(DateUtils.getNowDate());
        return noticeMapper.insertNotice(notice);
    }

    /**
     * 修改标书通知
     *
     * @param notice 标书通知
     * @return 结果
     */
    @Override
    public int updateNotice(Notice notice) {
        notice.setUpdateTime(DateUtils.getNowDate());
        return noticeMapper.updateNotice(notice);
    }

    /**
     * 批量删除标书通知
     *
     * @param ids 需要删除的标书通知主键
     * @return 结果
     */
    @Override
    public int deleteNoticeByIds(Long[] ids) {
        return noticeMapper.deleteNoticeByIds(ids);
    }

    /**
     * 删除标书通知信息
     *
     * @param id 标书通知主键
     * @return 结果
     */
    @Override
    public int deleteNoticeById(Long id) {
        return noticeMapper.deleteNoticeById(id);
    }
}
